﻿// See https://aka.ms/new-console-template for more information
using Newtonsoft.Json;
using QQRobot.AMiao;
using QQRobot.Services;
using QQRobot.Services.Models.Response;
using System.Text;
using WebApiClient;

Console.WriteLine("Hello, World!");
//await AmiaoRobot.OnLineRobot();

await DaYuanShuaiRobot.OnLineRobot();


#region 百度翻译
//var TranslatResult = await BaiduAPI.GetBaiduTranslateAsync("你在干啥");
//Console.WriteLine(TranslatResult.trans_result.FirstOrDefault().dst);
#endregion

#region 彩票

//var UnionLottoResult = Lottery.GetUnionLottoAsync();
//Console.WriteLine(UnionLottoResult);

//var BigLottoResult =   Lottery.GeBigLottoAsync();
//Console.WriteLine(BigLottoResult);

//var api = HttpApi.Create<ILotteryAPI>();
//var bigLottoResult = await api.GeBigLottoAsync();
//StringBuilder stringBuilder = new StringBuilder();
//stringBuilder.AppendLine($"期号\t开奖日期\t开奖号码\t        一等奖金额  \t中奖注数");

//if (bigLottoResult != null && bigLottoResult.ErrorCode == "0"
//    && bigLottoResult.Value.List?.Any() == true)
//{
//    bigLottoResult.Value.List.ForEach(s =>
//    {
//        var one = s.PrizeLevelList.FirstOrDefault(x => x.AwardType == 0);//一等奖信息
//        if (one != null)
//        {
//            stringBuilder.AppendFormat($"{s.LotteryDrawNum}\t{s.LotteryDrawTime}\t{s.LotteryDrawResult}\t{one.StakeAmount}元\t    {one.StakeCount}\n");
//        }
//    });
//    Console.WriteLine(stringBuilder.ToString());  
//}
#endregion


//var str = await BaiduAPI.GetBaiduHotSearch();
//Console.WriteLine(img);